//
//  File.swift
//
//
//  Created by didi on 2022/9/8.
//

import Foundation

public struct Config: Codable {
    public struct Install: Codable {
        public internal(set) var currentStep: String
        public var nextQueryKey: String
    }

    public struct Paths: Codable {
        public var admin: String
        public var api: String
        public var install: String
        public var sitemap: String
        public var rss: String
        public var robots: String
        public var manifest: String
    }

    public var install: Install
    public var paths: Paths
    public var filters: [String]
    public var listLimit: Int

    static var `default`: Config {
        .init(
            install: .init(
                currentStep: SystemInstallStep.start.key,
                nextQueryKey: "next"),
            paths: .init(admin: "admin",
                         api: "api",
                         install: "install",
                         sitemap: "sitemap.xml",
                         rss: "rss.xml",
                         robots: "robots.txt",
                         manifest: "manifest.json"),
            filters: ["markdown", "swifty"],
            listLimit: 20)
    }
}
